import Vue from 'vue'
import Router from 'vue-router'
import Home from "@/views/Home";
import Index from "@/views/index";
import Student from "@/views/Student";

//路由配置文件
Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/',
            name: 'Home',
            component: Home,
            children:[ // Home是父级 嵌套两个子路由
                {
                    path: '/index',
                    name: 'Index',
                    // eslint-disable-next-line no-undef
                    component: Index,
                 },
                {
                    path: '/student',
                    name: 'Student',
                    // eslint-disable-next-line no-undef
                    component: Student,
                }
            ]
        }
    ]
})
